
import { createRouter, createWebHistory } from 'vue-router'
import Cookies from 'js-cookie'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    //首页
    {
      path: '/',
      name: 'home',
      component: () => import('../views/Layout.vue'),
      redirect: '/user_table',
      children: [
        {
          path: '/user_table',
          component: () => import('../views/UserTable.vue'),
          name: 'use table',
        },
        {
          path: '/blibli',
          component: () => import('../views/BiLiBiLi.vue'),
          name: 'blibli',
          meta: { title: 'Zip', icon: 'zip' },
        },
        {
          path: '/search',
          component: () => import('@/components/Belikesearch.vue'),
          name: '模糊搜索',
        }
      ]
    },
    {
      path: '/todolist',
      name: 'todolist',
      component: () => import('../views/Layout.vue'),
      redirect:'/todolist/index',
      children: [
        {
          path: '/todolist/index',
          component: () => import('../components/todolist.vue'),
          name: 'todo',
        }
      ]
    },
    {
      path: '/drag',
      name: 'drag',
      component: () => import('../views/Layout.vue'),
      redirect: '/drag/index',
      children: [
        {
          path: '/drag/index',
          name:'Drag',
          component:()=>import('../views/Drag.vue')
        }
      ]
    },
    //登录
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/Login.vue')
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('../views/Login.vue')
    },
    // {
    //   path: '/table',
    //   name: 'table',
    //   component: () => import('../views/Layout.vue'),
    //   redirect: '/table/index',
    //   icon:'CirclePlus',
    //   children: [
    //     {
    //       path: '/table/index',
    //       name: 'table',
    //       component: () => import('../views/one.vue'),
    //     }
    //   ]
    // },
    {
      path: '/echarts',
      name: 'echarts',
      component: () => import('../views/Layout.vue'),
      redirect: '/echarts/index',
      children: [
        {
          name: 'echarts',
          path: '/echarts/index',
          component: () => import('../views/echarts.vue')
        }

      ],

    },
    {
      path: '/404',
      name: '404',
      component: () => import('../views/404.vue')
    },
    {
      path: '/imglist',
      name: 'imglist',
      component: () => import('../views/ImgList.vue')
    },
    {
      path: '/carousel-chart',
      name: '轮播图',
      component: () => import('../views/Layout.vue'),
      redirect: '/infinite-round-robin',
      children: [
        {
          path: "/infinite-round-robin",
          component: () => import('../components/carousel/InfiniteRoundRobin.vue'),
          name:'无限循环滚动'
        }
      ]
    },
    {
      path: '/draw',
      name: '画板',
      component: () => import('../views/Layout.vue'),
      redirect: '/draw',
      children: [
        {
          path: '/draw',
          name: '画板',
          component: () => import('../components/Draw.vue')
        }
      ]
    },
    {
      path: '/flip-clock',
      name: '时钟',
      component: () => import('../views/Layout.vue'),
      redirect: '/flip-clock',
      children: [
        {
          path: '/flip-clock',
          name: '翻牌时钟',
          component: () => import('../components/countdown/FlipClock.vue')
        },
        {
          path: '/count',
          component: () => import('../components/clock/Count.vue'),
          name: '卡牌倒计时',
        }
        
      ]
    },
    {
      path: '/chapter',
      name: '小说分页',
      component: () => import('../views/Layout.vue'),
      redirect: '/chapter',
      children: [
        {
          path: '/chapter',
          name: '小说章节列表',
          component: () => import('../components/chapter/List.vue')
        },
        // {
        //   path: '/count',
        //   component: () => import('../components/clock/Count.vue'),
        //   name: '卡牌倒计时',
        // }
        
      ]
    }

  ]
})


export default router
